/*
 * MouseListener.hpp
 *
 *  Created on: 03-12-2010
 *      Author: Przemek
 */

#pragma once

#include "Event.hpp"
#include "geometry/Vector.hpp"

/*
 * Listener which handles every mouse event.
 */
class MouseListener
{
	public:
		class EventArguments: public Event
		{
			public:
				enum Button
				{
					NONE, LEFT, RIGHT
				};
			private:
				Vector point;
				Button button;

			public:
				explicit EventArguments(const Vector& point = Vector(0, 0), Button button = NONE,
						const Control* source = 0);
				EventArguments(const EventArguments& other);
				EventArguments& operator=(const EventArguments& other);
				const Vector& getPoint() const;
				void setPoint(const Vector& point);

				Button getButton() const;
				void setButton(Button button);
		};

		virtual void mousePressed(const EventArguments& arguments);
		virtual void mouseEntered();
		virtual void mouseExited();
		virtual void mouseMoved(const EventArguments& arguments);
		virtual void mouseDragged(const EventArguments& arguments);
		virtual void mouseReleased(const EventArguments& arguments);
};
